package com.xc.tjise.TJISE.day06;

public class ArrayTest { //Array ：数组
    public static void main(String[] args) {
        int[] ints; // 数组的声明
        ints =new int[10]; //初始化
        double[] doubles = new double[100]; //生命且初始化
        String[] strings ={"zhang","wen","yuan"};
        System.out.println(strings[0]+strings[1]);
        System.out.println(doubles[0]);
        System.out.println(ints[ints.length-1]); //数组的长度 数组元素的个数 10个 再 -一
        for (int i=0;i<doubles.length;i++) {
            doubles[i]=1;
        }
        //iter + Tab
        /*for (double aDouble : doubles) {//增强for循环
            System.out.println(aDouble);
        */
     //Object[] objects={1,1.2,"",new ArrayTest(),""};

     //遍历
         //for (int row=0;row<boolean)
           byte[][] bytes = {
                   {1},
                   {1,2},
                   {1,2,3},
                   {1,2,3,4},
           };
        for (int row=0;row<bytes.length;row++) {
            for (int col = 0; col < bytes[row].length; col++) {
                System.out.print(bytes[row][col] + "\t");
            }
            System.out.println();

        }
        byte[] power = {1,2,3,4,5,6,7,8,9};
        for (int i=0;i<power.length;i++){
            for (int j=0;j<power.length;j++) {
                if (i>=j) {
                    System.out.print(power[i] + "*" + power[j] + "=" + (power[i] * power[j])+"\t");
                }
            }
            System.out.println();
        }
    }
}
